<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAuthenticator Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAuthenticator Class Reference<br /><sup><sup>[<a href="qtnetwork.html">QtNetwork</a> module]</sup></sup></h1><p>The QAuthenticator class provides an authentication object.
<a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qauthenticator.html#QAuthenticator">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qauthenticator.html#QAuthenticator-2">__init__</a></b> (<i>self</i>, QAuthenticator&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="qauthenticator.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qauthenticator.html#option">option</a></b> (<i>self</i>, QString&#160;<i>opt</i>)</li><li><div class="fn" />dict-of-QString-QVariant <b><a href="qauthenticator.html#options">options</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qauthenticator.html#password">password</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qauthenticator.html#realm">realm</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qauthenticator.html#setOption">setOption</a></b> (<i>self</i>, QString&#160;<i>opt</i>, QVariant&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qauthenticator.html#setPassword">setPassword</a></b> (<i>self</i>, QString&#160;<i>password</i>)</li><li><div class="fn" /><b><a href="qauthenticator.html#setUser">setUser</a></b> (<i>self</i>, QString&#160;<i>user</i>)</li><li><div class="fn" />QString <b><a href="qauthenticator.html#user">user</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qauthenticator.html#__eq__">__eq__</a></b> (<i>self</i>, QAuthenticator&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="qauthenticator.html#__ne__">__ne__</a></b> (<i>self</i>, QAuthenticator&#160;<i>other</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAuthenticator class provides an authentication object.</p>
<p>The QAuthenticator class is usually used in the <a href="qnetworkaccessmanager.html#authenticationRequired">authenticationRequired()</a>
and <a href="qnetworkaccessmanager.html#proxyAuthenticationRequired">proxyAuthenticationRequired()</a>
signals of <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a> and <a href="qabstractsocket.html">QAbstractSocket</a>. The class provides a
way to pass back the required authentication information to the
socket when accessing services that require authentication.</p>
<p>QAuthenticator supports the following authentication
methods:</p>
<ul>
<li>Basic</li>
<li>NTLM version 2</li>
<li>Digest-MD5</li>
</ul>
<a id="options" name="options" />
<h3>Options</h3>
<p>In addition to the username and password required for
authentication, a QAuthenticator object can also contain additional
options. The <a href="qauthenticator.html#options">options</a>()
function can be used to query incoming options sent by the server;
the <a href="qauthenticator.html#setOption">setOption</a>()
function can be used to set outgoing options, to be processed by
the authenticator calculation. The options accepted and provided
depend on the authentication type (see method()).</p>
<p>The following tables list known incoming options as well as
accepted outgoing options. The list of incoming options is not
exhaustive, since servers may include additional information at any
time. The list of outgoing options is exhaustive, however, and no
unknown options will be treated or sent back to the server.</p>
<a id="basic" name="basic" />
<h4>Basic</h4>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Option</th>
<th>Direction</th>
<th>Description</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><tt>realm</tt></td>
<td>Incoming</td>
<td>Contains the realm of the authentication, the same as <a href="qauthenticator.html#realm">realm</a>()</td>
</tr>
</table>
<p>The Basic authentication mechanism supports no outgoing
options.</p>
<a id="ntlm-version-2" name="ntlm-version-2" />
<h4>NTLM version 2</h4>
<p>The NTLM authentication mechanism currently supports no incoming
or outgoing options.</p>
<a id="digest-md5" name="digest-md5" />
<h4>Digest-MD5</h4>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Option</th>
<th>Direction</th>
<th>Description</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><tt>realm</tt></td>
<td>Incoming</td>
<td>Contains the realm of the authentication, the same as <a href="qauthenticator.html#realm">realm</a>()</td>
</tr>
</table>
<p>The Digest-MD5 authentication mechanism supports no outgoing
options.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAuthenticator" />QAuthenticator.__init__ (<i>self</i>)</h3><p>Constructs an empty authentication object</p>


<h3 class="fn"><a name="QAuthenticator-2" />QAuthenticator.__init__ (<i>self</i>, <a href="qauthenticator.html">QAuthenticator</a>&#160;<i>other</i>)</h3><p>Constructs a copy of <i>other</i>.</p>


<h3 class="fn"><a name="isNull" />bool QAuthenticator.isNull (<i>self</i>)</h3><p>Returns true if the authenticator is null.</p>


<h3 class="fn"><a name="option" />QVariant QAuthenticator.option (<i>self</i>, QString&#160;<i>opt</i>)</h3><p>Returns the value related to option <i>opt</i> if it was set by
the server. See <a href="qauthenticator.html#options">QAuthenticator#Options</a> for more
information on incoming options. If option <i>opt</i> isn't found,
an invalid <a href="qvariant.html">QVariant</a> will be
returned.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qauthenticator.html#setOption">setOption</a>(), <a href="qauthenticator.html#options">options</a>(), and <a href="qauthenticator.html#options">QAuthenticator#Options</a>.</p>


<h3 class="fn"><a name="options" />dict-of-QString-QVariant QAuthenticator.options (<i>self</i>)</h3><p>Returns all incoming options set in this <a href="qauthenticator.html">QAuthenticator</a> object by parsing the
server reply. See <a href="qauthenticator.html#options">QAuthenticator#Options</a> for more
information on incoming options.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qauthenticator.html#option">option</a>() and <a href="qauthenticator.html#options">QAuthenticator#Options</a>.</p>


<h3 class="fn"><a name="password" />QString QAuthenticator.password (<i>self</i>)</h3><p>returns the password used for authentication.</p>
<p><b>See also</b> <a href="qauthenticator.html#setPassword">setPassword</a>().</p>


<h3 class="fn"><a name="realm" />QString QAuthenticator.realm (<i>self</i>)</h3><p>returns the realm requiring authentication.</p>


<h3 class="fn"><a name="setOption" />QAuthenticator.setOption (<i>self</i>, QString&#160;<i>opt</i>, QVariant&#160;<i>value</i>)</h3><p>Sets the outgoing option <i>opt</i> to value <i>value</i>. See
<a href="qauthenticator.html#options">QAuthenticator#Options</a>
for more information on outgoing options.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qauthenticator.html#options">options</a>(), <a href="qauthenticator.html#option">option</a>(), and <a href="qauthenticator.html#options">QAuthenticator#Options</a>.</p>


<h3 class="fn"><a name="setPassword" />QAuthenticator.setPassword (<i>self</i>, QString&#160;<i>password</i>)</h3><p>Sets the <i>password</i> used for authentication.</p>
<p><b>See also</b> <a href="qauthenticator.html#password">password</a>().</p>


<h3 class="fn"><a name="setUser" />QAuthenticator.setUser (<i>self</i>, QString&#160;<i>user</i>)</h3><p>Sets the <i>user</i> used for authentication.</p>
<p><b>See also</b> <a href="qauthenticator.html#user">user</a>().</p>


<h3 class="fn"><a name="user" />QString QAuthenticator.user (<i>self</i>)</h3><p>returns the user used for authentication.</p>
<p><b>See also</b> <a href="qauthenticator.html#setUser">setUser</a>().</p>


<h3 class="fn"><a name="__eq__" />bool QAuthenticator.__eq__ (<i>self</i>, <a href="qauthenticator.html">QAuthenticator</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__ne__" />bool QAuthenticator.__ne__ (<i>self</i>, <a href="qauthenticator.html">QAuthenticator</a>&#160;<i>other</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>